﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IPC.Communication.Framework.Core.IMessage
{
    public class AllenBradleyMessage : INetMessage
    {
        public int ProtocolHeadBytesLength
        {
            get
            {
                return 24;
            }
        }

        public byte[] HeadBytes
        {
            get;
            set;
        }

        public byte[] ContentBytes
        {
            get;
            set;
        }

        public byte[] SendBytes
        {
            get;
            set;
        }

        public int GetContentLengthByHeadBytes()
        {
            return (int)BitConverter.ToUInt16(this.HeadBytes, 2);
        }

        public bool CheckHeadBytesLegal(byte[] token)
        {
            return true;
        }

        public int GetHeadBytesIdentity()
        {
            return 0;
        }
    }
}
